import { CardActionsEnum } from '../../../_/vue/store/card'
import axios from '../../../plugins/axios'
export default {
  /** 卡密列表 */
  [CardActionsEnum.LIST] ({ commit }, params = {}) {
    return axios.get('/cards', { params })
  },
  /** 生成卡密 */
  [CardActionsEnum.STORE] ({ commit }, data) {
    return axios.post('/cards', data)
  },
  /** 删除卡密 */
  [CardActionsEnum.DELETE] ({ commit }, data) {
    return axios.delete('/cards', { data })
  }
}
